/*
*   Handles the request type, and the id of the object
*   the request is for.
*
*/

#ifndef REQUEST_H
#define REQUEST_H

typedef struct request {
    int requestType;    //the type of request
    int objectID;       //the objects id that we are requesting
    int mutexID;        //the id of the mutex we are requesting, only use this when requesting a condition variable

    void(*destruct)(struct request*);
}RequestStr;

typedef RequestStr* RequestPtr;

RequestPtr requestConstructor(int requestType, int objectID);

        //Use only for condition variables, since the mutex they are associated with cannot be predicted.
RequestPtr requestCVConstructor(int requestType, int objectID, int mutexID);

void requestDestructor(RequestPtr this);

#endif
